<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Textbox.ascx.cs" Inherits="Common_Textbox" %>
<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>

<script language="javascript">
    function CheckRequireContent() 
    {
        var msgTextReq = "Text Content Require!";
        var stateCheck = true; 
        var textContentID = "<%=FreeTextBox1.ClientID %>";
        var ftb = FTB_API[textContentID];
        if (ftb == null) {
            alert(msgTextReq);
            ftb.Focus();
            stateCheck = false;
        }
        var _text = ftb.GetHtml();
        if (_text == "") {
            alert(msgTextReq);
            ftb.Focus();
            stateCheck = false;
        }
        return stateCheck;
    }
    
    function SetFTBText(textValue) {
        var ftbText = FTB_API["<%=FreeTextBox1.ClientID %>"];
        if (ftbText != null) {
        ftbText.SetHtml(textValue);
    }
    return false;
    }
</script>

<FTB:FreeTextBox id="FreeTextBox1" runat="Server" Focus="false"
        GutterBackColor="red"
        DesignModeCss="designmode.css"		 
        SupportFolder="~/FTBEditor/Configuration/"
        JavaScriptLocation="ExternalFile" 
        ButtonImagesLocation="ExternalFile" 
        ToolbarImagesLocation="ExternalFile" 
        ToolbarStyleConfiguration="Office2003" 
        ImageGalleryUrl="FTBEditor/ftbImageGallery.aspx?rif={0}&cif={0}"
        toolbarlayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu,FontForeColorPicker,FontBackColorsMenu,FontBackColorPicker,Bold,Italic,Underline,Strikethrough,Superscript,Subscript,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList,Indent,Outdent;CreateLink,InsertImage,InsertImageFromGallery,InsertRule|Cut,Copy,Paste,Delete;Undo,Redo,Print" />